
app:registClass("CosplayController", "app.cosplay.controllers.CosplayController")
app:registClass("CosKOFController", "app.cosplay.controllers.CosKOFController")

local CosplayModel = import(".models.CosplayModel")

app:registInst(CosplayModel.new())

app:registInst(app:getClass("CosplayController").new({type="systemUI"}))
app:registInst(app:getClass("CosKOFController").new({type="systemUI"}))

-- 进入 cosplay 选角界面
app.session:on("pb_rollplay.S2C_StartRollSelect", function(msg)
	app:sendMsg("CosplayModel", "S2C_StartRollSelect", msg)
end)

-- cosplay 选角更新
app.session:on("pb_rollplay.S2C_UpdateRollPlayInfo", function(msg)
	app:sendMsg("CosplayModel", "S2C_UpdateRollPlayInfo", msg)
end)

-- 进入 kof 选角界面
app.session:on("pb_rollplay.S2C_StartKOFRollSelect", function(msg)
	app:sendMsg("CosplayModel", "S2C_StartKOFRollSelect", msg)
end)

-- kof 选角更新
app.session:on("pb_rollplay.S2C_UpdateKOFRollSelect", function(msg)
	app:sendMsg("CosplayModel", "S2C_UpdateKOFRollSelect", msg)
end)